<html>

<head>

<?php

include "../includes/constants.php";
@include "../includes/functions.php";
@include "../includes/profile.php";

if ($_GET[id]) {
	echo "<title>EQ Emu - " . $Profile[name] . "'s Quest Globals</title>\n";
} else {echo "<title>EQ Emu - Quest Globals</title>\n";};

?>

</head>

<body>

<?php
if ($_GET[id]) {
?>

<table border="1">
	<tr>
		<td>Name</td>
		<td>Value</td>
		<td>Expires</td>
	</tr>
<?php
$query = "SELECT * FROM quest_globals WHERE charid='" . $_GET[id] . "' ORDER BY name ASC";
$result = mysql_query($query,$db);

if ($db_row = mysql_fetch_array($result)) {
	do {
?>
	<tr>
		<td><?php echo $db_row[name]?></td>
		<td><?php echo $db_row[value]?></td>
		<td><?php echo $db_row[expdate]?></td>
	</tr>
<?php
	} while ($db_row = mysql_fetch_array($result));
};
?>
</table>

<?php

} else {
	echo "<form name=\"NoID\" method=\"GET\" action=\"\">Enter ID: <input type=\"text\" name=\"id\" size=\"2\"><br>\n";
};

?>

</body>

</html>